﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/OneColumn.Master" AutoEventWireup="true"
    CodeBehind="ThreadList.aspx.cs" Inherits="SharingCenter.Web.Mod.Groups.ThreadList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    <asp:Literal ID="ltrGroupTitle" runat="server"></asp:Literal>话题讨论区
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
    .searchtextbox{border:none;border:none!important;}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <div class="navcont">
        <myuc:GroupHeader ID="GroupHeader1" runat="server" GroupIdQueryStringField="id" />
        <myuc:GenericTabs ID="LinkListTabs2" runat="server" Section="GroupPage" SelectedItem="2"
            AddPageQueryString="true" />
        <div class="thbutton">
            <table>
                <tr>
                    <td valign="bottom">
                        <div class="bdr-all">
                            <input type="text" maxlength="128" style="border:none;" name="keyword" />
                            <input type="hidden" name="searchCategoryId" id="hdnCategory" value="<%=categoryId %>" />
                            <input type="hidden" name="groupId" id="Hidden1" value="<%=groupId %>" />
                        </div>
                    </td>
                    <td>
                        <asp:LinkButton  runat="server" CssClass="button" ID="btnSearch">搜索话题</asp:LinkButton>
                    </td>
                    <td>
                        <%--<span class="nss ns-add"></span>--%>
                        <a href="CreateThread.aspx?id=<%=Request.QueryString["id"] %>"
                            class="addbutton">发表话题</a>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div class="ctn1">
        <asp:ListView ID="ListView1" runat="server" DataSourceID="LinqDataSource1" DataKeyNames="ThreadId">
            <ItemTemplate>
                <tr class="ti">
                    <td class="r">
                        <asp:Label ID="TotalPostsLabel" runat="server" Text='<%# Convert.ToInt32(Eval("TotalPosts"))-1 %>' />
                    </td>
                    <td class="v">
                        <asp:Label ID="ViewCountLabel" runat="server" Text='<%# Eval("ViewCount") %>' />
                    </td>
                    <td class="t">
                        <table cellspacing="0" cellpadding="0" class="nobdr">
                            <tr>
                                <td>
                                     <span class="litetext sz-s">[<%# WebConsts.THREAD_TYPE[Convert.ToInt16(Eval("ThreadType"))] %>]</span>
                                </td>
                                <td>
                                <asp:Image CssClass="tic" ID="Image1" runat="server" ImageUrl='<%#Eval("ThreadIcon", "~/Content/images/threadicons/{0}") %>'
                                        Visible='<%#Eval("ThreadIcon").ToString()!=""%>' />
                                    <asp:HyperLink ID="MainPostIdLabel" runat="server" Text='<%# Eval("PostTitle") %>'
                                        NavigateUrl='<%#Eval("ThreadId", "Posts.aspx?t={0}&u=1")+"&id="+Request.QueryString["id"] %>' />
                                </td>
                                <td>
                                    <asp:Panel runat="server" CssClass="nss ns-hot" title="精彩话题" ID="pnHot">
                                    </asp:Panel>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td class="cu">
                        <cc:AvatarImage ID="AvatarImage1" runat="server" UserId='<%# Eval("CreatorUserId") %>'
                            AlternateText="" AvatarType="Tiny" />
                        <cc:NickNameLink ID="NickNameLink1" runat="server" UserId='<%# Eval("CreatorUserId") %>' />
                    </td>
                    <td class="cd">
                        <span class="fd"><%# Eval("CreateDate")%></span>
                        <%--<asp:Label ID="Label1" runat="server" Text='<%# SharingCenter.Web.Classes.Utility.FriendlyDateTime(Eval("CreateDate"), SharingCenter.Web.Classes.TimeDisplayEnum.LiteralHours, false) %>' />--%>
                    </td>
                    <td class="lu">
                        <span class="fd"><%# Eval("LastUpdate")%></span>
                        <%--<asp:Label ID="LastUpdateLabel" runat="server" Text='<%# SharingCenter.Web.Classes.Utility.FriendlyDateTime(Eval("LastUpdate"), SharingCenter.Web.Classes.TimeDisplayEnum.LiteralHours, false) %>' />--%>
                    </td>
                </tr>
            </ItemTemplate>
            <EmptyDataTemplate>
                <div class="litetext">
                    目前没有话题。</div>
            </EmptyDataTemplate>
            <LayoutTemplate>
                <table id="itemPlaceholderContainer" runat="server" border="0" class="tlist" cellspacing="0">
                    <tbody>
                        <tr id="Tr1" runat="server" class="th">
                            <th id="Th1" runat="server" class="r">
                                回复
                            </th>
                            <th id="Th2" runat="server" class="v">
                                阅读
                            </th>
                            <th id="Th3" runat="server" class="t">
                                主题
                            </th>
                            <th id="Th4" runat="server" class="cu">
                                作者
                            </th>
                            <th id="Th6" runat="server" class="cd">
                                发表时间
                            </th>
                            <th id="Th5" runat="server" class="lu">
                                最后更新
                            </th>
                        </tr>
                        <tr id="itemPlaceholder" runat="server">
                        </tr>
                    </tbody>
                </table>
                <div class="actionarea">
                    <asp:DataPager ID="DataPager1" runat="server" PageSize="30" QueryStringField="p">
                        <Fields>
                            <asp:NextPreviousPagerField ButtonType="Link" FirstPageText="首页" ShowFirstPageButton="True"
                                ShowNextPageButton="False" ShowPreviousPageButton="False" />
                            <asp:NumericPagerField />
                            <asp:NextPreviousPagerField ButtonType="Link" LastPageText="末页" ShowLastPageButton="True"
                                ShowNextPageButton="False" ShowPreviousPageButton="False" />
                        </Fields>
                    </asp:DataPager>
                </div>
            </LayoutTemplate>
        </asp:ListView>
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" OrderBy="LastUpdate desc">
        </asp:LinqDataSource>
    </div>
</asp:Content>
